<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>2.分析Hello</title>
    <script type="text/javascript" src="../js/vue.js"></script>
</head>

<body>
    <div id="demo">
        <h4>学校名称:{{name}}</h4>
        <h4>学校地址:{{address}}</h4>
        <hr />
        <h4>人名:{{person.name}}</h4>
        <h4>年龄:{{person.age}}</h4>
        <hr />
        <h3>人名(大写):{{person.name.toUpperCase()}}</h3>
        <h3>年龄(大1岁):{{person.age+1}}</h3>
        <h3>{{person.age >18?'成年':'未成年'}}</h3>
        <h3>{{100}}</h3>
        <h3>{{100+1}}</h3>
        <h3>{{'100'+ 1}}</h3>
    </div>
    <script type="text/javascript">
        //阻止 vue 在启动时生成生产提示
        Vue.config.productionTip = false;
        new Vue({
            el: "#demo",
            data: {
                name: '尚硅谷',
                address: '宏福科技园',
                person: {
                    name: 'tom',
                    age: 13
                }
            }
        })
    </script>
</body>

</html>